home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 55 / MOBICLIC 55.ISO / DATA / ARRIBA / SWF_ARRIBA / arri01.swf / scripts / DefineSprite_76 / frame_15 / DoAction.as
Text File  |  2003-06-02  |  484b  |  27 lines

  1. function getLoop()
  2. {
  3.    return null;
  4. }
  5. function getGoal()
  6. {
  7.    vGoalX = _parent._xmouse;
  8.    vGoalY = _parent._ymouse;
  9. }
  10. function getShoot()
  11. {
  12.    var lMC = vGameMC.getNearestPlayer(vGoalX,vGoalY,0);
  13.    if(lMC != this)
  14.    {
  15.       var lAngle = Math.atan2(lMC._y - _Y,lMC._x - _X);
  16.       vCos = Math.cos(lAngle);
  17.       vSin = Math.sin(lAngle);
  18.       return 1;
  19.    }
  20.    if(vGameMC.vMouseDown)
  21.    {
  22.       vGameMC.vMouseDown = 0;
  23.       return 1;
  24.    }
  25.    return 0;
  26. }
  27.